package Homework.Three;

import java.io.*;
import java.nio.charset.StandardCharsets;

public class Test4 {
    public static void main(String[] args) throws IOException {
        File file = new File("./src/main/java/Homework/Three/");
        File[] subs = file.listFiles(f->f.getName().endsWith(".java"));
        for (int i = 0; i < subs.length; i++) {
            File sub = subs[i];
            FileInputStream fis = new FileInputStream(sub);
            InputStreamReader isr = new InputStreamReader(fis);
            BufferedReader br = new BufferedReader(isr);
            String line;
            while((line = br.readLine())!=null){
                System.out.println(line);
            }
            br.close();
        }
    }
}
